import java.util.Random;
import java.util.Scanner;

public class GassNum {

    public static void main(String[] args) {
        Random r = new Random();
        Scanner c = new Scanner(System.in);

        int i = r.nextInt(100) + 1;
        while(true) {
            System.out.println("请输入要猜的数字:");
            int p = c.nextInt();
            if(p > i) {
                System.out.println("过大");
            } else if (p < i) {
                System.out.println("过小");
            } else {
                System.out.println("猜对了");
                break;
            }
        }
    }
}
